#pragma once
#include <string>
#include <vector>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/string.hpp>
#include "ElementHidingStructs.h"
using namespace std;

//Class that contains all element hiding rules
class CElementHidingCollection
{
public:
	CElementHidingCollection();
	CElementHidingCollection(CElementHidingCollection&& elem);
	bool Add(string domain, string selector);
	const vector<wstring>& GetAdvertIdElements() const;
	const vector<wstring>& GetAdvertClassElements() const;

private:
	//element hiding rules that don't specify domain
	vector<wstring> _advIdElements;
	vector<wstring> _advClassElements;
	vector<wstring> _advOtherElements;

	//and those that specify domain
	vector<DomainClassElementHidingRule> _advDomainClassElements;
	vector<DomainIdElementHidingRule> _advDomainIdElements;
	vector<GeneralElementHidingRule> _advDomainOtherElements;

	//methods for serialization
	friend class boost::serialization::access;    
    template<class Archive>
    void serialize(Archive & ar, const unsigned int version)
    {
		ar & _advIdElements;
		ar & _advClassElements;
		ar & _advOtherElements;

		ar & _advDomainIdElements;
		ar & _advDomainClassElements;		
		ar & _advDomainOtherElements;
    }
};

